/*
 * Release.java
 *
 * Copyright(c) 2011
 * Michael Kroez
 * kroez@studiorutton.de
 *
 * All rights reserved.
 *
 * $Id$
 * 
 */

package de.studiorutton.changelog;

import java.util.ArrayList;


public class Release {
	private String mVersion;
	private ArrayList<String> mItems = new ArrayList<String>();
	
	Release(String version) {
		mVersion = version;
	}
	
	public void setVersion( String version ) {
		mVersion = version;
	}
	
	public String getVersion() {
		return mVersion;
	}
	
	public void add( String item ) {
		mItems.add( item );
	}
	
	public int size() {
		return mItems.size();
	}
	
	public String getItem( int index ) {
		return mItems.get( index );
	}
	
	public ArrayList<String> getItems() {
		return mItems;
	}
	
	public String toString(){
		StringBuilder sb = new StringBuilder();
		sb.append( "Version: " + mVersion + "\n");
		for( String item: mItems ) {
			sb.append("Release: " + item + "\n");
		}
		return sb.toString();
	}
	
}
